;Assembler header file for SharedCLibrary
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:03:54 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 18 May 1995

        [       :LNOT: :DEF: SharedCLibrary_Hdr
        GBLS    SharedCLibrary_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

;Symbols for constants
SharedCLibrary_RootStackSizeShift *       16

;Symbols for structure offsets and sizes
                                ^       0
SharedCLibrary_Stub_chunk_id    #       Int
SharedCLibrary_Stub_entry_vector #       Ptr
SharedCLibrary_Stub_entry_vector_limit #       Ptr
SharedCLibrary_Stub_static_data #       Ptr
SharedCLibrary_Stub_static_data_limit #       Ptr
SharedCLibrary_Stub             *       @

                                ^       0
SharedCLibrary_StubList_stub    #       SharedCLibrary_Stub
SharedCLibrary_StubList         *       @


;Symbols for SWI's and SWI reason codes
XSharedCLibrary_LibInitAPCS_A   *       &A0680
SharedCLibrary_LibInitAPCS_A    *       &80680

XSharedCLibrary_LibInitAPCS_R   *       &A0681
SharedCLibrary_LibInitAPCS_R    *       &80681
   ;Entry
   ;  R0 -> stub_list (SharedCLibrary_StubList)
   ;  R1 = workspace (pointer to Void)
   ;  R2 = workspace_limit (pointer to Void)
   ;  R3 = &FFFFFFFF
   ;  R4 = &0
   ;  R5 = &FFFFFFFF
   ;  R6 = shifted_root_stack_size (Int)
   ;Exit
   ;  R0 corrupted
   ;  R1 -> stack (data)
   ;  R2 = stack_limit (pointer to data)
   ;  R6 = version (Int)

XSharedCLibrary_LibInitModule   *       &A0682
SharedCLibrary_LibInitModule    *       &80682
   ;Entry
   ;  R0 -> stub_list (SharedCLibrary_StubList)
   ;  R1 = workspace (pointer to Void)
   ;  R2 = workspace_limit (pointer to Void)
   ;  R3 = clear (pointer to data)
   ;  R4 -> static_data (data)
   ;  R5 = static_data_limit (pointer to data)
   ;  R6 = shifted_root_stack_size (Int)
   ;Exit
   ;  R0 corrupted
   ;  R1 -> stack (data)
   ;  R2 = stack_limit (pointer to data)
   ;  R6 = version (Int)

XSharedCLibrary_LibInitAPCS_32  *       &A0683
SharedCLibrary_LibInitAPCS_32   *       &80683
   ;Entry
   ;  R0 -> stub_list (SharedCLibrary_StubList)
   ;  R1 = workspace (pointer to Void)
   ;  R2 = workspace_limit (pointer to Void)
   ;  R3 = &FFFFFFFF
   ;  R4 = &0
   ;  R5 = &FFFFFFFF
   ;  R6 = shifted_root_stack_size (Int)
   ;Exit
   ;  R0 corrupted
   ;  R1 -> stack (data)
   ;  R2 = stack_limit (pointer to data)
   ;  R6 = version (Int)

XSharedCLibrary_LibInitModuleAPCS_32 *       &A0684
SharedCLibrary_LibInitModuleAPCS_32 *       &80684
   ;Entry
   ;  R0 -> stub_list (SharedCLibrary_StubList)
   ;  R1 = workspace (pointer to Void)
   ;  R2 = workspace_limit (pointer to Void)
   ;  R3 = clear (pointer to data)
   ;  R4 -> static_data (data)
   ;  R5 = static_data_limit (pointer to data)
   ;  R6 = shifted_root_stack_size (Int)
   ;Exit
   ;  R0 corrupted
   ;  R1 -> stack (data)
   ;  R2 = stack_limit (pointer to data)
   ;  R6 = version (Int)

        ]
        END
